const db = uniCloud.database()

module.exports = {
	_before: function () { // 通用预处理器

	},
	getTeacher: async () => {
		const result = db.collection('teacher').get()
		return await result
	},
	getTeacherByName: async (name) => {
		const result = db.collection('teacher').where({
			name
		}).get()
		
		return await result
	},
	getTeacherInfo: async (info) => {
		return await db.collection('teacher').where(info).get()
	}
}
